import { sendRequest } from '@/http';

/* 设备列表 */
export const queryDeviceList = (params: any) =>
  sendRequest({
    url: `/admin/iot/product/queryProductList`,
    method: 'get',
    params,
  });

/* 设备详情 */
export const queryDeviceDetail = (productId: string) =>
  sendRequest({
    url: `/admin/iot/medst/queryMedStewardInfo`,
    method: 'get',
    params: { productId },
  });

/* 编辑布防位置 */
export const editMedstPosition = (data: any) =>
  sendRequest({
    url: `/admin/iot/medst/editPosition`,
    method: 'post',
    data,
  });

/* 编辑布防位置 */
export const addMedstPosition = (data: any) =>
  sendRequest({
    url: `/admin/iot/medst/editPosition`,
    method: 'post',
    data,
  });

/* 启用设备 */
export const enableMedSteward = (productId: string) =>
  sendRequest({
    url: `/admin/iot/medst/enableMedSteward`,
    method: 'post',
    data: { productId },
  });

/* 禁用设备 */
export const disableMedSteward = (productId: string) =>
  sendRequest({
    url: `/admin/iot/medst/disableMedSteward`,
    method: 'post',
    data: { productId },
  });
